﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="CreateUser.ascx.cs"
    Inherits="Portal.Administrator.Users.CreateUser" %>
<asp:UpdatePanel ID="upanelEditUser" runat="server" UpdateMode="Conditional" RenderMode="Inline">
    <ContentTemplate>
        <table id="TABLE1" border="0" cellpadding="2" cellspacing="2" style="width: 100%">
            <tr>
                <td style="padding-left:30px;">
                    <asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
                    <asp:ValidationSummary runat="server" ID="error_summary" Width />
                </td>
            </tr>
            <tr>
                <td valign="top" class="InputBox" style="width: 50%;">
                    <table border="0" cellpadding="2" cellspacing="2">
                        <tr>
                            <td style="width: 130px;">
                                <strong>Tên truy cập:</strong></td>
                            <td>
                                <asp:TextBox Width="200" ID="txtUsername" runat="server" CssClass="inputTextBox150"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUsername"
                                    ErrorMessage="Bạn cần nhập tên truy cập" Text="*"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Mật khẩu:</strong></td>
                            <td>
                                <asp:TextBox ID="txtPassword" runat="server" CssClass="inputTextBox150" TextMode="Password"
                                    Width="200"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword"
                                    ErrorMessage="Bạn cần nhập mật khẩu" Text="*"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Xác nhận mật khẩu:</strong></td>
                            <td>
                                <asp:TextBox ID="txtPasswordConfirm" runat="server" CssClass="inputTextBox150" TextMode="Password"
                                    Width="200"></asp:TextBox>&nbsp;
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPassword"
                                    ControlToValidate="txtPasswordConfirm" ErrorMessage="Mật khẩu xác nhận không đúng" Text="*"></asp:CompareValidator></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Tên hiển thị:</strong></td>
                            <td>
                                <asp:TextBox ID="txtDisplayName" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Email:</strong></td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmail"
                                    ErrorMessage="Bạn cần nhập Email" Text="*"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                                    ErrorMessage="Lỗi tên email" Text="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Họ đệm:</strong></td>
                            <td style="height: 23px">
                                <asp:TextBox ID="txtLastName" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Tên:</strong></td>
                            <td style="height: 23px">
                                <asp:TextBox ID="txtFirstName" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" style="height: 53px">
                                <strong>Thuộc Portal: </strong></td>
                            <td valign="top" style="height: 53px">
                                <asp:ListBox ID="lstPortal" runat="server" SelectionMode="Multiple" Style="height: 150px;
                                    width: 180px;" Width="200"></asp:ListBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="lstPortal"
                                    ErrorMessage="Bạn cần chọn Portal" Text="*"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr>
                            <td>
                                <strong></strong>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong></strong>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="InputBox" style="width: 50%;" valign="top">
                    <table border="0" cellpadding="2" cellspacing="2" style="width:100%;">
                        <tr>
                            <td style="width:130px;">
                                <strong>Điện thoại:</strong></td>
                            <td>
                                <asp:TextBox ID="txtTel" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Di động:</strong></td>
                            <td>
                                <asp:TextBox ID="txtMobile" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>Địa chỉ:</strong></td>
                            <td>
                                &nbsp;<asp:TextBox ID="txtAddress1" runat="server" CssClass="inputTextBox150" Height="60px"
                                    TextMode="MultiLine" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>ZipCode:</strong></td>
                            <td>
                                <asp:TextBox ID="txtZipCode" runat="server" CssClass="inputTextBox150" Width="200"></asp:TextBox></td>
                        </tr>
                        <tr style="display:none;">
                            <td>
                                <strong>Nước:</strong></td>
                            <td>
                                <asp:DropDownList ID="dropCountry" runat="server" Width="200">
                                    <asp:ListItem Value="1">Việt Nam</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td style="height: 26px">
                                <strong>Thành phố:</strong></td>
                            <td style="height: 26px">
                                <asp:DropDownList ID="dropCity" runat="server" Width="200">
                                    <asp:ListItem Value="1">H&#224; Nội</asp:ListItem>
                                    <asp:ListItem Value="2">Th&#224;nh phố Hồ Ch&#237; Minh</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr style="display:none;">
                            <td style="height: 26px">
                                <strong>Đối tác:</strong></td>
                            <td style="height: 26px">
                                <asp:DropDownList ID="dropPartner" runat="server" DataTextField="PartnerName" DataValueField="PartnerID" Width="200">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td style="width: 150px">
                                <strong>Loại User</strong></td>
                            <td>
                                <asp:DropDownList ID="drl_usertype" runat="server" Enabled="false">
                                    <asp:ListItem Text="Đại biểu" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Quản trị viên" Selected="true" Value="1"></asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Panel ID="pnlSuperadmin" runat="server" Width="100%">
                                    <strong>
                                        <asp:CheckBox ID="chkIsSuperAdmin" runat="server" />Là Super Admin</strong></asp:Panel>
                                <asp:Panel ID="pnlAdmin" runat="server" Width="100%">
                                    <strong>
                                        <asp:CheckBox ID="chkIsAdmin" runat="server" Font-Bold="True" />Là Admin</strong>
                                </asp:Panel>
                            </td>
                        </tr>                        
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" class="InputBox" colspan="2" style="height: 28px">
                    <table>
                        <tr>
                            <td>
                                <asp:Button ID="btnUpdate" runat="server" CssClass="Button70" OnClick="btnCreate_Click"
                                Text="Cập  nhật" />
                            </td>
                            <td>
                                <asp:Button ID="btnCancel" runat="server" CssClass="Button70" OnClick="btnCancel_Click"
                                Text="Hủy" Width="84px" />
                            </td>
                            <td>
                                <asp:Button ID="Button1" runat="server" CssClass="Button70" OnClientClick="history.back(); return false;"
                                Text="Quay lại" Width="84px" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
